<div class="login-box">
  <div class="login-logo">
    <a><b>览众</b>场外交收平台</a>
  </div>
  <!-- /.login-logo -->
  <div class="login-box-body">
    <p class="login-box-msg">请输入账号密码登录</p>
    <form method="post" #loginForm='ngForm'>
      <div class="form-group has-feedback">
        <input type="text" [(ngModel)]='user.username' #username="ngModel" name="username" class="form-control" placeholder="账号" required/>
        <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
      </div>
      <div *ngIf="username.invalid && (username.dirty || username.touched)"
           class="alert alert-danger">
        <div *ngIf="username.errors.required">
          用户名不能为空！
        </div>
      </div>
      <div class="form-group has-feedback">
        <input type="password" [(ngModel)]='user.password' #password="ngModel"
               name="password" class="form-control" placeholder="密码"
               required (input)="passwordIncorrectStatus = true"/>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div *ngIf="password.invalid && (password.dirty || password.touched)"
           class="alert alert-danger">

        <div *ngIf="password.errors.required">
          用户密码不能为空！
        </div>
      </div>
      <div *ngIf="!this.passwordIncorrectStatus"
           class="alert alert-danger">
        <div>
          用户密码错误！
        </div>
      </div>
      <div class="row">
        <div class="col-xs-8">
          <div class="checkbox icheck">
            <label>
              <input type="checkbox"> 记住我
            </label>
          </div>
        </div>
        <!-- /.col -->
        <div class="col-xs-4">
          <button type="button" (click)="login()" class="btn btn-primary btn-block btn-flat"
                  [disabled]="loginForm.invalid">登录</button>
        </div>
        <!-- /.col -->
      </div>
    </form>
    <!-- /.social-auth-links -->
  </div>
  <!-- /.login-box-body -->
</div>
